home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Digital Information Mana…ntial Guide to Multimedia
/
Digital Information Management - An Essential Guide to Multimedia.iso
/
Portable
/
PortableOpenOfficeCode
/
PortableOpenOfficeApp.nsi
< prev
next >
Wrap
Text File
|
2006-05-16
|
3KB
|
107 lines
;Copyright (C) 2004-2005 John T. Haller
;Additional Ideas from tracon and mai9
;Website: http://portableapps.com/portableopenoffice
;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.
;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
!define NAME "PortableOpenOfficeMath"
!define FRIENDLYNAME "Portable OpenOffice.org Math"
!define APP "OpenOfficeMath"
!define VER "1.1.3.0"
!define WEBSITE "portableapps.com/portableopenoffice"
!define EXECTHIS "PortableOpenOffice.exe -math"
;=== Program Details
Name "${NAME}"
OutFile "${NAME}.exe"
Caption "${FRIENDLYNAME} - the complete office suite that's completely portable"
VIProductVersion "${VER}.0"
VIAddVersionKey FileDescription "${FRIENDLYNAME}"
VIAddVersionKey LegalCopyright "GPL"
VIAddVersionKey Comments "Allows ${APP} to be run from a removable drive. For additional details, visit ${WEBSITE}"
VIAddVersionKey CompanyName "by John T. Haller et al"
VIAddVersionKey OriginalFilename "${NAME}.exe"
VIAddVersionKey FileVersion "${VER}"
;=== Runtime Switches
CRCCheck On
WindowIcon Off
SilentInstall Silent
AutoCloseWindow True
;=== Program Icon
Icon "${APP}.ico"
Var EXECSTRING
Section "Main"
StrCpy $EXECSTRING "${EXECTHIS}"
;=== Get any passed parameters
Call GetParameters
Pop $0
StrCmp "'$0'" "''" "" LaunchProgramParameters
;=== No parameters
StrCpy $EXECSTRING `${EXECTHIS}`
Goto LaunchNow
LaunchProgramParameters:
StrCpy $EXECSTRING `${EXECTHIS} $0`
LaunchNow:
Exec $EXECSTRING
SectionEnd
Function "GetParameters"
Push $R0
Push $R1
Push $R2
StrCpy $R0 $CMDLINE 1
StrCpy $R1 '"'
StrCpy $R2 1
StrCmp $R0 '"' loop
StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
loop:
StrCpy $R0 $CMDLINE 1 $R2
StrCmp $R0 $R1 loop2
StrCmp $R0 "\" "" "nofile"
IntOp $2 $R2 + 1
nofile:
;MessageBox MB_OK "r0: $R0"
StrCmp $R0 "" loop2
IntOp $R2 $R2 + 1
Goto loop
loop2:
IntOp $R0 $R2 - $2
IntOp $R0 $R0 - 4
;MessageBox MB_OK "$R2 - $2 = $R0"
StrCpy $R7 $CMDLINE $R0 $2 ; we save the filename
;MessageBox MB_OK "$2"
loop2b:
IntOp $R2 $R2 + 1
StrCpy $R0 $CMDLINE 1 $R2
;MessageBox MB_OK "rr0: $R0"
StrCmp $R0 " " loop2b
StrCpy $R0 $CMDLINE "" $R2
Pop $R2
Pop $R1
Exch $R0
FunctionEnd